package com.rem.concurrency.multithreading.state;

/**
 * 倒计时
 *
 * @author Rem
 * @date 2021-03-03
 */

public class ThreadSleep2 {


    public static void tenDown() throws InterruptedException {
        int num = 10;
        while (num > 0) {
            Thread.sleep(1000);
            System.err.println(num);
            num--;
        }
    }


    public static void main(String[] args) throws InterruptedException {
        tenDown();
    }


}
